package com.gxa.learning.core.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 * 部门表的映射实体
 *
 * @author lijianmin
 * @date 2021/12/02  14:52:18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "tb_department")
@ApiModel
public class Department {

    /**
     * 部门编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "department_id")
    @ApiModelProperty(name = "id", value = "id", dataType = "Long", example = "1")
    private Long id;

    /**
     * 公司编号
     */
    @Column(name = "company_id")
    @ApiModelProperty(name = "companyId", value = "companyId", dataType = "Long", example = "1")
    private Long companyId;

    /**
     * 部门名称
     */
    @Column(name = "department_name")
    @ApiModelProperty(name = "name", value = "name", dataType = "String", example = "技术部")
    private String name;
}
